ConsoleApplication: platform detection fixed