Fix Windows accelerators (menu command shortcuts) enabling/disabling

The hack is not beautiful.