Wrap everything in a function

HHVM doens't JIT psudomains because there is too much magic that global
variables can do.