Fix in Util and test use global to expose XHR