I created this script at /usr/local/bin/gzip:
/usr/local/bin/gzip
#!/bin/sh -eu exec /usr/bin/gzip "$GZIP" "$@"
It makes the environment variable work like before.