Fix Special:Preferences onBeforeUnload handler