The effect of discretization on homoclinic orbits