replace ast_safe_string_alloc() with asprintf()