fix for PHP 5.5

This patch fix this extension for PHP 5.5 (and a few build warnings)

Mostly inspired by xdebug and APC fixes.

Build : ok without warning
Load : ok with php 5.5 snapshot 201301021430
Profiling : ok