adapt the code to different freebsd versions.
Not necessary to MFC