Excerpt from the SDK documentation :
GetInstanceVariableCount()
Return the number of instance variables for this instance.
SetInstanceVariableValue(index, value)
GetInstanceVariableValue(index)
Set or get an instance variable value by its index. Note the type of the instance variable will be preserved.
So it seems variable names are lost, and you have to rely on the index.