apply svn fixes, bug-5765 fix applied there, builds for php-5.5