Dimensional reduction and axial anomalies