Port t_mlock to FreeBSD