US Congress passes spending bill to avert shutdown