An Efficient Method to Determine the Weight Distributions of Binary Quadratic Residue Codes