Fix opening MAT v4 files
Fix opening MAT v4 files

* src/mat.c (Mat_Open): Try reading header, and check if the file has
      the correct version and byteswap is 0 or 1. If not try opening the
      file as a V4 MAT file and reading a variable from it. If successful
      the file is a V4 MAT file, otherwise free the mat variable and
      return NULL.

tbeu/matio,tbeu/matio,MaartenBent/matio,CBL-ORION/matio-sf-mirror,CBL-ORION/matio,NJannasch/matio,MaartenBent/matio,martinichka/matio-coder,NJannasch/matio,martinichka/matio-coder,CBL-ORION/matio,telehan/libmatio,MaartenBent/matio,tbeu/matio,tbeu/matio,MaartenBent/matio,martinichka/matio-coder,CBL-ORION/matio-sf-mirror,telehan/libmatio