WL-3325 Add a hacky fix for IE

Apparently IE doesn't know what `document.location.origin` is.