Fix bug - In Mac, initial value of pthread_mutex_t is not zero.

Initialize pthread_mutex_t via methods.