Fixing compilation on Cygwin

Fixes #529.