Workaround an issue with headers in httr.

Currently `httr` drops the `Content-type` header [in some
cases](https://github.com/hadley/httr/pull/147), causing many requests to
fail. This works around the problem by taking advantage of some case
sensitivity in header name handling.