Analyzing Chain-of-Thought Prompting in Large Language Models via Gradient-based Feature Attributions