Fix preferences dialog for older versions of wxPython