Using browserify + hide menu when clicking outside