An own-goal from Dani Carvajal gave Juventus the lead in their International Champions Cup fixture against Real Madrid.