Fix some warnings on freebsd