Fix perl build bug