Revert "Improve checking of library versions."

This reverts commit 69fccdf5c633cf217caeb45e0a8398485d38e194.