The Lakers survived a late surge from the Warriors