Anomaly cancelling terms from the elliptic genus