Fixed contrib.gis tests breaking in some edge cases.

The tests would error out with an ImproperlyConfigured error
if the user had psycopg installed but not geos.
Thanks to mcgohier for the report.