Set SecurityRule attribute

Otherwise Level2 is used in .NET 4 or above, which doens't work correctly
for other versions