When compiling pde sketches the IDE links in some of the Arduino 'core' libraries, where byte is defined. You probably could just use standard C types that are 8 bits long, char? Or research the IDE build process to see which include files will pull in the byte type.
I had the same exact problem earlier today. I just used uint8_t instead of byte. After all, uint8_t (unsigned 8-bit integer) is the same as byte. I looked everywhere through the arduino core stuff to find how the type byte is defined, but to no avail. I was hoping to find the header file needed to be included so it would work...
So just replace "byte" with "uint8_t". That worked for me.