Provide an option for overriding the print-to-stdout function.