Update to upstream API changes.

Changes in gopherjs/gopherjs@d9b5cb94dcecb1a655bff84b and
gopherjs/gopherjs@4849c386217a149.
Fixes build, closes #4.