Fixed compilation against thread-safe PHP (ZTS)

Closes #541
Patch-by: Benjamin Morel <benjamin.morel@gmail.com>
Signed-off-by: Sandro Santilli <strk@keybit.net>

git-svn-id: http://svn.osgeo.org/geos/trunk@4019 5242fede-7e19-0410-aef8-94bd7d2200fb