moved some mingw specific things up the CMakeLists