Quantum size effects on the perpendicular upper critical field in ultrathin lead films