fix for ie window.document.location.origin problem