It looks like msys2 is using same version at least
https://packages.msys2.org/package/mingw-w64-x86_64-hdf5