Senate approves spending bill, averts government shutdown