Properly decode response body

Compatibility with Ruby 2.0