Improve version string parsing.

This library isn't interested in SNAPSHOT or alpha tags in version numbers, so
strip them out.