Fix perl build reliability