Fix "SEGV in idomod syslog call on Solaris".

This patch adds a check for a null-pointer to the filename
string to circumvent segfaults for Solaris.  Since the call can
never complete normally as invoked, return ERROR status and bail.

Fixes #5686