Fix API ret code changes of ToxCore

Corresponding fix of https://github.com/irungentoo/ProjectTox-Core/pull/667