more Cygwin portability (issue #4678)