US House approves spending bill to avoid government shutdown