Applying workarounds for HHVM compatibility

This PR tries to make travis builds succeed on HHVM until current PHP incompatibilities are solved as of #127