workaround https://code.google.com/p/dart/issues/detail?id=12287 to get dart2js compilation working

There are still runtime errors in the dart2js version (issues listed in
the README), but I need dart2js to at least pass on this code so that I
can get my application building