cmake: support 2.8.7

Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
unbound: plumb the libdir up

This is necessary for static builds where the linking is passed around
to dependent targets, but the library is lost.
unbound: fix type checking
cmake: fix up link lines