Fixed a bug in determination of library dependencies.