Autodetect pthread_barrier functions presence at configure stage
Use supplied ones if no system pthread_barrier functions was found