Use find_program() as a fallback for perl detection.

Merged Simon Morlat requested to merge fix/perl into pr1813-2.16.1

Merge request reports