Add extension method to compare prefixes.