made lsapi_main.c compatible with PHP7/phpng .