restore patches from https://github.com/Polymer/CustomElements/pull/59

Two of the changes from https://github.com/Polymer/CustomElements/pull/59 were inadvertently dropped when I merged in the latest Polymer code. And didn't know to run our html/custom test suite in the Dart repository. Whoops. R= @blois