Added support for building on FreeBSD.