Adapt custom event cration to wxWidgets 2.9, fixes an error with MinGW builds.