Gauge fields for electrons in crystals with topological defects