[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.

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes #2208 from liancheng/spark-3234 and squashes the following commits:

fb26de8 [Cheng Lian] Fixed SPARK-3234
(cherry picked from commit 287c0ac7722dd4bc51b921ccc6f0e3c1625b5ff4)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>