copy the definition of ast_strdupa and use it instead of strdupa to fix the