Fix build on FreeBSD

Fix build on FreeBSD.