Adds compatibility checks for IE 8 and 9.

Fixes issue #267.