Fixed build on FreeBSD