fix build system on freebsd