US House passes legislation aimed at averting national rail shutdown