I was able to compile the sketch with a few changes. You were right, the Arduino IDE on the Pi causes some problems because the libraries are older and I was not able to get the newer IDE to work properly. What I ended up doing was to update the libraries which were causing the problem and then getting the program to compile.
To compile the program, copy the zip attached here to the Pi and unzip it. I have renamed the sketch to emon_test.ino. Next, open the terminal and goto the folder where you have extracted the contents and run these commands to update the libraries which were causing the problem:
sudo cp WString.h /usr/share/arduino/hardware/arduino/cores/arduino/ then
sudo cp WString.cpp /usr/share/arduino/hardware/arduino/cores/arduino/ (See screenshot).
Next, open the emon_test.ino in the Arduino IDE and compile. It should work now (see screenshot). Make sure that you are using the Arduino IDE 1.0.5 so that you can upload the program.
Sorry for the troubles, we didn;t know that there were problems with the Arduino 1.0.5 IDE and we'll update the IDE to 1.6.5 as soon as we finish testing the IDE and make sure that everything works properly with it.