fix freebsd regression caused by 9582f99671fccaec5bc225f0aa0a660d712bbb44