Fixed compilation issues for cygwin.