Improve NativeFunction to support variadic functions