ruby: Fix to build with __USE_MINGW_ANSI_STDIO