S.Korea, U.S. reach deal to revise civil nuclear pact