I know its been awhile, but I was trying to figure out the same thing today and came across your question. Incase you were still looking for the answer, try adding a boolean at the end. Ex:
var mask1 : LayerMask;
var mask2 : LayerMask;
Physics.IgnoreLayerCollision(mask1, mask2, true);