Group cohomology and lattice invariants of real quadratic fields