port library to use NAN

fix #33
Merge branch 'rlidwka-master'