See https://github.com/openlayers/ol3/commit/49bf204c