Support IE

IE doesn't have location.origin, which is used here to extract hostname. Since location.host is supported everywhere I suggest this.
Merge pull request #1 from kika/patch-1

Support IE