Fixes window on before unload on FF & IE (refs #298)