Fix JS errors in older IE browsers.

Fixes #21.