Scalar Aharonov‐Bohm effect in the presence of a topological defect