Perl-Support: Improved automatic configuration.

- Improved the way the plug-in directory is obtained in case of a global
  installation (thanks to Yegor).