Few building fixes on FreeBSD