This code works under IDE 1.0.4
make sure you have "#include <EEPROM.h>" in the sketch ( not just library ).