Fix unicode decode error in syslog for modules

Fixes #6056