daemon: fix mavericks strlcpy/strcat

Patch from macports (thanks to mbogosian): https://trac.macports.org/ticket/42845

Closes #25455.
Closes #27585.