Workaround for the lack of baseURI under IE

IE doesn't have the document.baseURI property.
This workaround constructs the baseURI if not present.