Restore window close handlers for Chrome