Fixing `undefined is not a function` error in browser
Don't leak XMLHttpRequest into global scope