handle webgl context loss, see #279