Generation of entanglement between two spatially separated atoms via dispersive atom–field interaction