Move the `if` for IE windows

fix #825