Harry Kane scored his 400th goal in club football to give Bayern Munich an early lead against Borussia Dortmund.