fix wx window crash at startup with wx3.0