See: https://github.com/bartvde/ol3/commit/0a93bb38f85f908ed8298a817f931711b684f60e