A novel method of measuring the interaction matrix for diffractive liquid crystal wavefront correctors