NNLO hard functions in massless QCD