Set menu-iconic and menuitem-iconic classes when necessary.