Make sure <link.h> exists before using it.

Ideally, this closes #218