Fix compilation with latest CMake on windows