Undefined defaultPrinter when no_console flag is set

When compiling with the flag no_console, it complains about no defaultPrinter.
Currently, the fix is setting defaultPrinter to null