Don't fallback to window.location in getOrigin func