Bayern Munich needed two injury time goals to see off Freiburg in their Bundesliga meeting on Wednesday.