Experimental simulation of closed timelike curves