fixed compile errors with HDF5
changed CMakeLists.txt for new build system