fix cmake degrade on mingw.