Add a portable wrapper for reader-writer locks.