Fix #959, make the onunload deregistering conditional on MSIE (though removing it entirely would also be a possibility)