U.S. government reopens, avoids default