Fix cygwin build which was failed due to snprintf