Dimensional regularization and the two-loop axial anomaly in abelian, non-abelian and supersymmetric gauge theories