B fix linking

Fixes #6 

This is pending testing with installed debs, as it is then that the problem shows. I'm not sure how to generate the same conditions without actually doing a release.
This has been taken as-is from:
https://github.com/PR2/pr2_mechanism/blob/hydro-devel/pr2_hardware_interface/cmake/pr2_hardware_interface-extras.cmake.em