I was having the same problem with a dependency plug-in for jQuery, just use this code:
$('head').append('');
then your code will work in almost all browsers, here "content" is a variable you define externally and it will contain the data you want to insert into tags. it will certainly work.