Accommodate some changes in recent cmake for HDF5 finding

After upgrading cmake, I discovered that its HDF-finding logic has changed slightly. This change should accommodate it.