In the node based XMLHTTPRequest object, xhr.status is a string not an int; Fixing code to account for both browser and node.