fix freebsd support