Fixed compile error on FreeBSD