fix compile issues in cygwin