I think the solution here is everybody masquerades as Googlebot so we can render the whole thing moot
The check itself could be implemented for example with ASN or reverse DNS lookup or hard-coding known Google's IP ranges (though that's prone to become stale)