Hi there,
I noticed your announcement for the fix. I would like to add,
that the class JDocumentRendererHead is obsolete and an alias for class HeadRenderer.
Refer to classmap.php in folder "libraries" of Joomla root directory.
So I fixed it like this:
// require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');
// $header_renderer = new JDocumentRendererHead($doc);
$header_renderer = new Joomla\CMS\Document\Renderer\Html\HeadRenderer($doc);
As far as I know the class is autoloaded, that is why I did not use "require_once" or "JLoader::import()";