Hide the menu when clicking outside