Make image comparisons work with jdk 7
[GEOT-4602] Fix SQLServer support for Z coordinates (in native serialization mode)