Added ES3 compatibility. Now supports IE7, IE8.