Revert the removal of a BC relevant part.

Revert the removal of a BC relevant part.
Fixes reported BC break in 2.5 mentioned in https://github.com/CakeDC/search/issues/119
and happened in https://github.com/cakephp/cakephp/pull/2289/files#r11487575

Completes https://github.com/cakephp/cakephp/pull/3015