A symmetry result in R2 for global minimizers of a general type of nonlocal energy