The code is correct, I do not get any compilation error. I think you had a problem when you installed the library, or installed the wrong one. Erase the library folder (I mean the folder of the library LiquidCrystal-I2C) and install this one instead.
Then, run the IDE again and try to compile