Boy Scouts formally confirms Gates as president