Add missing TSRMLS for master

There were some ABI changes in PHP master (TSRMLS_FETCH crusade). This patch adds some ifdefs to fix compilation errors on PHP 5.6 and master