Added a Obj-C lock wrapper around pthread_rwlock.