Add proper string conversion for outputting HTTP headers in atexit hook.