[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.
We are `grep`-ing `<id>hive</id>` from output of `project.activeProfiles`, so it should be fine.