Fixed kx.iterator implement function so it also works with objects