Add optional phpdbg support to php 5.4 and above

Fixes issue #961