Revert "Improve CMake script for Windows builds"

This reverts commit e92a68fb46d0a68fa3d67878211bc3275ee5ec59.