Add option to quit to menu bar on mac

It would be useful on mac to be able to quit the application to the menu bar as well as closing it to the menu bar to prevent accidental quitting of the app. Option to quit could be a menu bar item