Added support for webGL context loss