fix exception

Fix an exception to do with API changes in Dartium.

@umop