Senate set to pass legislation aimed at averting a rail strike