_POSIX_SOURCE is too strict, we need _DARWIN_C_SOURCE, otherwise <pthread.h> does not expose pthread_setname_np(3).