Fall back to SERVER_NAME if HTTP_HOST is not set

The Host: header is optional in HTTP/1.0, so fall back to the server
name if not supplied. If neither is supplied, fall back to the empty
string, to avoid undef warnings.
Merge pull request #3 from ilmari/http-host-undef

Fall back to SERVER_NAME if HTTP_HOST is not set