More robust autogen.sh