We do differently elsewhere. See https://github.com/openlayers/ol3/pull/929.