Fix up some autoconf macros to get freebsd builds working again.