Fix compilation errors when PHP is built with `--enable-maintainer-zts`.

This should fix #5.