Only link libs if the shared libs are there