[SPARK-3234][Build] Fixed environment variables that rely on deprecated command line options in make-distribution.sh

Please refer to [SPARK-3234](https://issues.apache.org/jira/browse/SPARK-3234) for details.
This seems a bit brittle - what if later we add a profile called `hive-extra` or something like that... will we remember to update this code. Why not check for a non-zero value?