ENH: make io.read_hdf5 more robust