Fix FreeBSD compile.

Signed-off-by: Kevin <kevainxxx@gmail.com>