Detect console with on Windows

Signed-off-by: Nils Maier <maierman@web.de>