cmake improvements for Windows