correct cygwin detection (issue #5328)