Add support for building on FreeBSD