FreeBSD compatibility patch.