CMake linux fixes

fixed the compilation under linux. We forgot to put some windows specific things into an if.