Added a version comparison function cmp_versions() to utils.