Numerical solution of fractional integro-differential equations with weakly singular kernels