NBA will require teams to play national anthem before games