adding window.location.origin shim for old IE