Update for latest CMake (>=2.8.4)
Fix a compilation problem on cygwin