A reconstruction algorithm for single-particle diffraction imaging experiments