fix csv module interoperability with stdio