Add pair_cmp for building comparisons