IMF says Gita Gopinath leaving at end of August to return to Harvard