Update HDF4 code

Update HDF4 code for recent type changes, along with cleaning up a few warnings.