(cherry picked from commit ea862ec8ff)
ea862ec8ff
Also get mingw cross-compilation of these tests working