Append link elements to head instead of writing to document