returning headers array in all calls, fixed xdr regression

Added the headers to both cases, as mentioned in #42 
I found a regression that the new code assumes it's dealing with xhr object, while it can be an xdr object in ie8 cors.
this method doesn't exist in XDR