Fixing XHR shim regression due to introducing `regex` class