autogen.sh: Switch from bash to sh and make it POSIX