GCC 4.9 with ASan + UBSan on OS X complains that we were casting to int from a wider integer type. Anyway, this cast is totally non-portable (pthread_t could even be structure), switching to long gets rid of the warning...