Extracting complex resonance energies from real calculations