workaround for XHR to use URL.resolve