Hi,
I know it’s 10 years later but I’ve searched for the same thing now and found nothing.
To take care of my needs in this Headless context I’ve created this subversion patch http://pastebin.com/Hi4tf3px
It works for me and what I need, but I may have broken stuff for other who apply this patch.
Get the source code and apply it, then call game.SetHeadless(true); on your game instance before game.Run.
Maybe somebody will find it useful.