A New Method for Resolving the 180° Ambiguity in Solar Vector Magnetograms