fix issue https://github.com/facebook/hhvm/issues/3230  and minor issue with zend_compat