modified to work on Cygwin

I got compile error on Cygwin.