House votes to avert rail strike; Senate to act next