Polyfill of the DOM URL spec for browser environment