Revert to the FreeBSD way of locking