Fixed ImportError when running contrib.gis tests without libgeos installed.