apply a workaround for perl bug #117947 on affected versions