Sri Lanka president says China agrees to restructure loans