Detect click on window close 'X' button in Firefox?