Replace references with AM_CPPFLAGS. This worked as far back as automake 1.6, our declared minimum version.