VIA rail comes to agreement with union