remaining endian.h fixes for FreeBSD (bug #3867)