use rb_io_stdio_file in 1.9 to prevent segfaults