Corrected an issue when compiling with HDF4 and CMake.