Add action listener to menu item for exit.