lib/replace: add more condition to add snprintf.c