cygwin fixes, cmake modified to build out of source