changes to build on windows / cygwin