Fix a compile problem when building with CLang

I'm not sure why this hasn't been a problem before, but sys/rwlock.h
is definitely a required header here.