Use pthread_equals in libpbd for portability