Be more cautious when testing for OpenLayers