removed some unused AM_*_LEGACY macros (nw)