Merge pull request #3 from siboulet/tests

Add tests
Merge pull request #4 from siboulet/nan

Ported to NAN, compiles on v0.11.14