Fixed errors in portmidi and rtmidi backends caused by callback rewrite.