Fix crash due to str_appendf() not understanding %ld