Try to include Arduino.h before including MIDI.h.

From the MIDI.h file: