FreeBSD build fix.
Make sure to #include <pthread_np.h> on FreeBSD.