QCD calculation of the hadronic part of the photon structure function