Check library can be linked.

Solves a build failure on Fedora 18 where systemd headers were present but
`ld ... -lsystemd` would fail.