Fix perl detection on windows. The current way is ignoring MSYS

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

installation.

Merge request reports