Update XMLHttpRequest.js

Sets global agent