mods to levmar for win32 because NAN is not defined