Fixing a regression in XHR shim

- Fixing XHR shim regression due to introducing `regex` class
- This affected node.js servers making proxy requests, e.g. `turtle.io`