Changed cmake python library search startegy for crosscompiling

Backport of PR #3189 to branch 2.4.
Enables non-strict library version matching during cross compile for ARM with Python support.