China, Pakistan vow to thwart any attempt to undermine bilateral ties