Topological wormholes: Nonlocal defects on the toric code