Path integrals with a periodic constraint: The Aharonov–Bohm effect