QCD at imaginary chemical potential with Wilson fermions