Make autogen.sh more portable by having it work on both Linux and FreeBSD