Updated native code for node 0.11.X and improved memory handling