length.cpp - no longer using XLENGTH (does not compile in R < 3.0)