Fallback to jQuery beforeunload