fix cmake degrade on MinGW.

support Clang/GNU on MacOSX.