using getEnvironment instead of lookupEnv (base >= 4.6.0.0)