Twist defect in chiral photonic structures with spatially varying pitch