fixed relative URLs in firefox (window.location.origin not supported)