Update hook test for Node 0.11 compatibility

Node 0.11 throws an exception if the second argument to runInThisContext
is not an object.