Add convenience function for comparing with multiple targets in C API