See https://github.com/wxWidgets/wxWidgets/pull/346 (cherry picked from commit d24fbc7808)
d24fbc7808