Locate version check before dependent library installations

This PR fixes #8.