Fix fileno not always present. fileno(stdout) = STDOUT_FILENO.

This was a problem when compiling on Cygwin with gcc 4.8.