Updated to more recent API and tried to fix missing dart C calls.