Use a variable stdout print function.

Depending on the paltform we might need to use different functions for
printing to stdout.
To allow more flexibility, the print function is now defined as
variable which can be set via the device configuration.

Signed-off-by: Ruediger Gad <r.c.g@gmx.de>