Possible fix for issue #18

repaired implementation for XHR contructor to work independently of a possibly present mocking framework, resolved infinite loop error