Fix origin check for IE (#460)