Revert "Revert "Fixed references to libraries.""

This reverts commit 3feaa8a0f7b22f344921462ea3cbe533bce115e9.