started changes to allow compiling from cygwin