Fix attachEvent on IE11 Windows 8.1