[build] freebsd fixes