Add missing #ifdef in SWIG layer for HDF5.