Fix Makefile.am and configure.ac for the new version of autotools