Added conditional imports for gis

Added flags before gis related definitions, in order to avoid the ImportError obtained when importing gis libraries (the full error was: "ImportError: Could not find the GEOS library (tried "geos_c", "GEOS"). Try setting GEOS_LIBRARY_PATH in your settings.").