IE8 Compatibility

This is mostly about following upstream changes for IE8 compatibility.