add the compatibility to support both cygwin and linux