See https://github.com/elemoine/ol3/commit/41fb8fab7a4854d109a8b08239fc8f9e805a053f.