Use Nan for compatibility with multiple node versions (fix #3)

It compiles and the tests pass for me on mac os 10.10, with both node 0.10.32 and 0.11.14.