workaround for wxOSX crash http://trac.wxwidgets.org/ticket/15956