Avoid unintended global

The `name` variable in `Diagram.prototype.getActor` is never declared, making it an unintended global. This fixes that.