Remove unnecessary flags settings.
Add hdf5 build.