fix freebsd build