Improve derivation of host from WSGI environ variables