Add location.origin polyfill