Add support for Browserify

When running under Browserify, response.on('data') may be called with a
string or an array buffer (not just with a Buffer). Wrap those types in
a buffer so that response.on('end') is able to process the data
correctly.
Add support for setting responseType

It's convenient to be able to set the expected response type for the
XHR, particularly when receiving binary data.