Cmake + MinGW

Hopefully improved compatibility with MinGW