Improved getting GLEEZ_ENV

The only thing I'm not sure - IIS.
Please test