php53: fix issue with using --with-thread-safety

closes issue #962