US Senate leaders agree to put two competing bills that could end government shutdown to the vote on Thursday.