We calculate analytically the geometric phases that the eigenvectors of a parametric dissipative two-state system described by a complex symmetric Hamiltonian pick up when an exceptional point (EP) is encircled. An EP is a parameter setting where the two eigenvalues and the corresponding eigenvectors of the Hamiltonian coalesce. We show that it can be encircled on a path along which the eigenvectors remain approximately real and discuss a microwave cavity experiment, where such an encircling of an EP was realized. Since the wavefunctions remain approximately real, they could be reconstructed from the nodal lines of the recorded spatial intensity distributions of the electric fields inside the resonator. We measured the geometric phases that occur when an EP is encircled four times and thus confirmed that for our system an EP is a branch point of fourth order.