SMRC: Aligning Large Language Models with Student Reasoning for Mathematical Error Correction