Senate reaches compromise to end government shutdown