The convergence of difference approximations for optimal control problems