A little out of sync with the rest of Spark, where we use `System.getenv` pretty consistently.