fix snprintf for windows