Polyfill to get the base URI for browsers that don't fully support DOM level 3.