Hi Sorry but I just noticed this is a duplicate of bug 27555, last modified over 4 years ago.
To save anyone else wasting a lot of time over this, I could send in a patch to skip the test under Cygwin - how about it? (You just need to test if $(uname -s) starts "CYGWIN"). Cheers ... Duncan.