See http://apple.stackexchange.com/questions/148841/scriptable-menu-bar-icons/154661#comment181951_154661