Improve systemd detection in installer script.