Fixes to run on HHVM