add 'ast_cond_t' type for pthread condition variables, and appropriate API wrappers