systemd: Avoid unused function warning when disabled
If the project is configured to build without systemd support, this function is unused.
If one is foolish enough to also build with -Werror, as I am, then this the resulting unused-function warning is fatal and one is sad.