Add AM_PROG_AR to avoid errors and warnings when running autogen.sh.

Newer versions of automake require this.
Allow subdir-objects in automake.

Newer versions of automake require this.