Fixed 'invalid conversion' compile erros for node bindings

This error was not happening on node 0.8 but we got it on node 0.10.12 on Ubuntu, and node 0.10.10 on Mac. Tested the fix on Ubuntu with node v0.10.12 , and Mac with node v0.8.10