scons: only link in libraries that are required by the build