fix static build with CMake on Windwos