adapt WSGI to parse environment