If your state mandates such, it should be a simple matter to cut a dowel of correct length and diameter, and extend same upwards in the mag within the spring coils. Chamfer the top, so as to prevent the spring from hanging up on a sharp shoulder. Length will be by trial and error. Affix the correct length dowel via a small wood screw through a hole drilled in the floorplate. Or simply buy one. Depends on how much you figure your time is worth.
The real advantage of the short, 5-rd mags is that they are obviously shortened, and will not attract attention. You might have a perfectly legal, modified standard length mag, and still be subject to inspection by your local conservation officers. Who needs that?
Spend the $, and buy a short, legal mag. Besides, they're good for shooting from a bench. Spare your full-length mags from alterations. YMMV.