Support MinGW with CMake

Now supports MinGW  testcpp.