Replace the NEWOBJ macro with the newres<T> function.

This way this extension builds with HHVM's master branch.
Merge pull request #34 from mssola/pull

Replace the NEWOBJ macro with the newres<T> function.