Constrained minima of nonlocal free energy functionals