Improved FreeBSD support