Wrap everything in a function

HHVM doens't JIT psudomains because there is too much magic that global
variables can do.
Merge pull request #664 from ptarjan/hhvm

Wrap everything in a function