Measurement of the Seebeck coefficient by an ac technique: Application to high‐temperature superconductors