compilation fixes for cygwin.