Adapt code to dart:isolate changes