Fix to find menus by caption in wxPython 2.9.4.

I tested this in wx 2.8.12.1 as well: nothing is broken.