export ENV_DIR to sub environments

This allows pre_compile and post_compile hooks to access the environment variables