Fix all compilation bugs for PHP 5.2.18-dev
Fix compiler warnings and use PHP coding style
Release 1.0.4