Cocycles of area-preserving diffeomorphisms and anomalies in the theory of relativistic surfaces