More FreeBSD compatibility improvements.