Fix handling of library dependencies to make them explicit.