Jaylen Brown scored 32 as Boston Celtics edged Philadelphia 109-108, ending the 76ers unbeaten run in the NBA Cup.