Fundamental gaps in finite systems from eigenvalues of a generalized Kohn-Sham method.