I managed to work around this problem by simply setting the font color to my background before I included the cgi file. That leaves an open tag, shouldn't be a problem, but you can close it if you want with a print statement inside the cgi file.
There is still some IIS setting we have wrong that makes it print that header info, but I have no idea what it might be and don't have access to the IIS control panel