Patches for perl plugins failure when run by embedded perl interpreter [sf#1985338] [#1050]