Cygwin: Apply patches from downstream CMake package
Based on downstream patches from Cygwin package for CMake by Marco Atzeri.
- Their changes are expected to be non-breaking for non-Cygwin environments.
- References to the original patches are written in their commit messages respectively.
Edited by Brad King