Fix wxWidgets 2.9 deprecation warning.