Thickness-driven first-order phase transitions in manganite ultrathin films