It's been a while since I last used the MIDI.h library, so I can't really help you with that, but if you just need a MIDI library that supports MIDI over USB, you could use the Control Surface library I maintain:
https://tttapa.github.io/Control-Surface-doc/Doxygen/d3/df7/midi-tutorial.html