Compile fixes for Cygwin
Merge pull request #52 from edenhill/cygwin

Compile fixes for Cygwin (issue #25)