Add workaround for bug #671.

https://github.com/scala-js/scala-js/issues/671