fix build in FreeBSD