fix compile bug in freebsd