Anomalous coupling of scalars to gauge fields