Ie8 fixes

A collection of IE8-related fixes that I made today after looking at Lex's problems with sampler running on nightly.enyojs.com.

Tested in IE8, IE10, and Chrome.