Use commonplace polyfill for window.location.origin (bug 1094175)