Correctly populates $libs var for Makefile

This should fix the compile errors with osx/ubuntu. I'll need to test this on RHEL as well.