I'd rather see the 1.8.7 vs 1.9 difference handled by conditionally defining one of two versions of this method, similar to how it was before.  That's going to perform better since the conditional is resolved once at file load time and then isn't checked against (whereas your version checks the conditional everytime this matcher is used).