Germany coach Loew extends contract until 2018