Fix mingw compilation with --enable-targets=all.