Use StringIO.buflist if available, fall back otherwise