Fixed #17212 -- Made GEOS version regular expression more robust. Thanks, strk.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Improved GEOS version string parsing.

Based on django/django@747f7d2.
Merge pull request #2 from lemuelf/libgeos_version_detection_fixes

libgeos version detection fixes