Try to fix some errors in configure.ac.

automake was failing; following some suggestions from the Internet,
adding these lines to configure.ac seems to fix the problems.

Note: I know nothing about autoconf. :-)