Fix build on FreeBSD -CURRENT.

- Include rwlock.h  This is needed by new VM code.
 - strchrnul() is available on FreeBSD >= 1000028, don't define if
   that's the case.