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.