Add support for IE

Stupid IE8 doesn't do onload. This fixes support for IE by using onreadystatechange