US House passes spending bill, averts government shutdown