use the constants available for the standard streams instead of extracting them with fileno()

Just a minor thing. :)