Added support for setting environment variables when starting applications