Update autogen.sh to use autoreconf

Optional AUTOMAKE environment variable is checked to override the automake binary