build system: fix wxWidgets detection for wx 2.9x and mingw i686-pc-mingw32