OS X: ignore quit message if there are any modal dialogs opened (like preferences)