tweak when ENVIRONMENT is defined to minimize calls to defined()