Hegseth narrowly wins confirmation to become US defense secretary