Trump signs spending bill to avoid government shutdown