Added index to addRule to ensure order of rules

I added the index parameter to addRule to ensure that in IE rules will be added in the correct order. The issue was that when you had two rules with the same selector (the second one to override the first) the second rule was being written first and therefore not overriding the first rule. The order of the two rules was reversed resulting in the incorrect rule being used.