Prepared the migration to nan for more compatibility to future nodejs versions