Is there a way to determine if I'm running a console or a GUI app?