Generalize linking to boost libraries