fix for ie for location.origin