Gaskets for heat exchangers