Chances are any thing your going to find at a hardwear store is going to be to thick.I would think rubber would be a bad idea as you want it to be tight with no play. One of the Masters of the m14s on here showed me a neat trick, take the tightening screw peice of the gas cylinder off and count how many full turns it takes to get it off the threads. Now take it off the gun, turn it around 180 degrees and thread it back on, count the turns untill it tightens up on your gas system. It hopefully will allow you to tighten up more then the first way, and snug it right in. If this works you may not need a shim. If not then contact Hungry, M14 doctor or marstar I'm sure they can point you in the right direction. *your also going to need castle nut pliers to remove your flash hider*
Also if you are ever able to attend an M14 clinic do so, you will be amazed at what you will learn!
Hope that helps and makes sence