Derive of_std{in,out,err} from std{in,out,err}

Previously, this just assumed the existance of file descriptors 0, 1 and
2 - however, in GUI applications on Windows, these were missing when not
started from a console.