Fixes for HHVM #299