Add support for prefing off iccv4 support
diff --git a/iccread.c b/iccread.c
index 58b996d..772d0a7 100644
--- a/iccread.c
+++ b/iccread.c
@@ -1034,7 +1034,7 @@
 					profile->mBA = read_tag_lutmABType(src, index, TAG_B2A0);
 				}
 			}
-			if (find_tag(index, TAG_rXYZ)) {
+			if (find_tag(index, TAG_rXYZ) || !qcms_supports_iccv4) {
 				profile->redColorant = read_tag_XYZType(src, index, TAG_rXYZ);
 				profile->greenColorant = read_tag_XYZType(src, index, TAG_gXYZ);
 				profile->blueColorant = read_tag_XYZType(src, index, TAG_bXYZ);
@@ -1043,7 +1043,7 @@
 			if (!src->valid)
 				goto invalid_tag_table;
 
-			if (find_tag(index, TAG_rTRC)) {
+			if (find_tag(index, TAG_rTRC) || !qcms_supports_iccv4) {
 				profile->redTRC = read_tag_curveType(src, index, TAG_rTRC);
 				profile->greenTRC = read_tag_curveType(src, index, TAG_gTRC);
 				profile->blueTRC = read_tag_curveType(src, index, TAG_bTRC);
diff --git a/qcms.h b/qcms.h
index d45e89c..a5b87eb 100644
--- a/qcms.h
+++ b/qcms.h
@@ -144,7 +144,7 @@
 
 void qcms_transform_data(qcms_transform *transform, void *src, void *dest, size_t length);
 
-
+void qcms_enable_iccv4();
 
 #ifdef  __cplusplus
 }
diff --git a/qcmsint.h b/qcmsint.h
index 00d1964..02ac5ab 100644
--- a/qcmsint.h
+++ b/qcmsint.h
@@ -171,6 +171,8 @@
 	float *input_table;
 	float *clut_table;
 	float *output_table;
+
+	float table_data[];
 };
 #if 0
 /* this is from an intial idea of having the struct correspond to the data in
@@ -265,3 +267,5 @@
                                           unsigned char *src,
                                           unsigned char *dest,
                                           size_t length);
+
+extern qcms_bool qcms_supports_iccv4;
diff --git a/transform.c b/transform.c
index 72e5535..9a6562b 100644
--- a/transform.c
+++ b/transform.c
@@ -1114,7 +1114,7 @@
 		precache = true;
 	}
 
-	if (in->A2B0 || out->B2A0 || in->mAB || out->mAB) {
+	if (qcms_supports_iccv4 && (in->A2B0 || out->B2A0 || in->mAB || out->mAB)) {
 		// Precache the transformation to a CLUT 33x33x33 in size.
 		// 33 is used by many profiles and works well in pratice. 
 		// This evenly divides 256 into blocks of 8x8x8.
@@ -1264,3 +1264,9 @@
 {
 	transform->transform_fn(transform, src, dest, length);
 }
+
+qcms_bool qcms_supports_iccv4;
+void qcms_enable_iccv4()
+{
+	qcms_supports_iccv4 = true;
+}