Fix d2i_ASN1_INTEGER() and i2d_ASN1_INTEGER() so it correctly works out the length of negative integers.