Update to upstream API changes.

Changes in gopherjs/gopherjs@d9b5cb94dcecb1a655bff84b and
gopherjs/gopherjs@4849c386217a149.
Fixes build, closes #4.
Merge pull request #5 from shurcooL/master

Update to upstream API changes.