[build] freebsd build fixes