Jesse Lingard and Zlatan Ibrahimovic both scored as Manchester United beat Leicester 2-1 in the Community Shield.