Both India and China victims of terrorism: Modi tells Xi