Add support for choosing best version for package specs.