Fixed compilation error on FreeBSD