Minor Makefile change

Little bit more robust handling of linkage to hdf5 library