If this.host is empty (which it is when using IE), set it to window.location.host.