Fix multithreaded compilation on OS X Lion and above.

It appears that on versions beyond Snow Leopard, defining _XOPEN_SOURCE
causes pthread.h to not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER
(for whatever reason).