fix build on freebsd