An Efficient Algorithm for Obtaining the Distance Spectrum of Turbo Codes