Robert Lewandowski scored for a record ninth game in a row from the start of the season as champions Bayern Munich beat Union Berlin 2-1.