Migrate to using nan to smooth over v8 changes.