fixed #853 for good (i.e. for PHP 5.2.6 and higher)
Merged revisions 393134a065bd5d7e1bcb19f6ded1f4a395349135 via svnmerge from 
http://svn.agavi.org/branches/1.0