Fix MIDI fork using a modified version of a patch from warrenfalk. Fixes #3595.