Handle NULL ttyname

snprintf on x86 Solaris doesn't like being passed a NULL string and
ttyname returns NULL when called from inside cron
Bump version to 1.6.4