Fix the setting of 'window.ENV'.
Merge pull request #547 from zonak/fix_test_env

Fix the setting of 'window.ENV' for 'test'