Modified createStyleSheetTag function to include media attribute as parameter.