The homogeneneous balance method and its application to the Swift-Hohenberg equation