fix handling of constants on older perls