Fix handling of Rack HTTP_* values containing underscores

Rack expects HTTP headers such as User-Agent and X-Forwarded-For to be
made available to the Rack environment as HTTP_USER_AGENT and
HTTP_X_FORWARDED_FOR. In some cases, we were incorrectly failing to
populate the Rack environment with any headers that contained a hyphen.

This fixes the issue reported in #187.