[FIX] support old firefoxes not implementing window.location.origin