Senate moves to avert rail strike