XM looping problem in SDL_Mixer's MikMod

XM’s don’t seem to loop properly; instead of jumping to the restart
pattern they jump right back to the beginning. I’ve been able to to do
a quick-n-dirty fix by commenting out

if (!pf->wrap) return;

in mplayer.c, but I know there must be a better way. Yet messing with
flags and variables in xm_load.c does nothing. How can I get it to set
pf->wrap for XM’s specifically?