port forward of fixes from the stable version of rrd_cgi