macosx: fix 'toggle-sidebar' menu state (close #8213)