libmatio: ensure build without hdf5 if not explicitly requested

Closes #19408.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>