[mac] Fix app quit from dock and system menu