Anomalies and the euler characteristic of elliptic Calabi-Yau threefolds