Fix IE<10 errors; fixes #17