integrated changes to support use on Cygwin under windows