Remove automake macros obsoleted by automake 1.13. Fixes #9324.