Catch permission error in IE8 on page unload