Long-Period Effects in Nearly Commensurable Cases of the Restricted Three-Body Problem