Fix QuitDialog to behave correctly on mac