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.

Note: one out of 27 unit tests is failing - both before and after this change. Don't have time to track it, but someone should.