Polyfill for window.location.origin