Compile fix on platforms with missing pthread_rwlock_t.