Trump signs spending bill, averting government shutdown