Gamma-convergence of nonlocal perimeter functionals