Fixes for XHR shim