proto: use reflect.Ptr for backward compatibility

reflect.Pointer introduced on go1.18. Support 1.17 and earlier.

Change-Id: I62dcdb580a7976068e86df432bc44ee21c2cda81
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/412354
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Lasse Folger <lassefolger@google.com>
diff --git a/proto/equal.go b/proto/equal.go
index 49e16ba..67948dd 100644
--- a/proto/equal.go
+++ b/proto/equal.go
@@ -33,7 +33,7 @@
 	if x == nil || y == nil {
 		return x == nil && y == nil
 	}
-	if reflect.TypeOf(x).Kind() == reflect.Pointer && x == y {
+	if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y {
 		// Avoid an expensive comparison if both inputs are identical pointers.
 		return true
 	}