Add OSX compatible autogen.sh.