2.5 Add isUnique test + possible fix

Attempt to make recent change on `isUnique()` backward compatible.

Related:
- https://github.com/cakephp/cakephp/pull/4851#issuecomment-58882947
- croogo/croogo#56