Patch window.location.origin for IE9.