The absolute gradings on embedded contact homology and Seiberg-Witten Floer cohomology