fix build under freebsd