US Senate passes six-month spending bill, avoiding government shutdown