Use mate as namespace.

This is a much better name than nm.
Add compat.h as replacement for nan.