Fix API#request for Ruby 1.9