cmake_hdf5_*_lib should be defined only if HDF5 is being compiled

Fixes comments in hte pull request