Add support for browsers that don't natively support window.location.origin