Shorter way of getting the XHR object

Basically taken from jQuery:
https://github.com/jquery/jquery/blob/1.9-stable/src/ajax/xhr.js#L12-L23