Wrap v8 API calls with nan to support node 0.10 & 0.11

/to @bnoordhuis 
/cc @ritch