Write narrowest-possible ints in hdf5