If you're not going to do this over and over again, I did mine based on these instructions. Worked perfectly, and cost less than $3. Take a look:
Smith & Wesson M&P15-22 - 5
If you're going to do this more often, look into Tacticool 22's wrench, available in the classified section on top here.