Add workaround in OStream.writeutf