Have the Makefile link with the libraries it actually needs.