Fix JSValueToNSObject to correctly handle Arrays