Fixes for clean build on FreeBSD.