Implement quit menuitem in osx app