fix missing location.origin in IE