numDeriv must be here as well, if it is used in NAMESPACE