Probe for indirect library dependencies

This changeset fixes some issues with building on CentOS and OpenSuSE distros, as well as building with the cmake-branch of DUNE.