Tyrone McCarthy got the final score as Salford beat Wakefield 28-20 in what was both side's final game of the Super League season.