GraphMend: Code Transformations for Fixing Graph Breaks in PyTorch 2