Modified handling close window key event on Mac OS X (Command + q)