Support IE

IE doesn't have location.origin, which is used here to extract hostname. Since location.host is supported everywhere I suggest this.