You should ask this in the InDesign scripting forum!
Adding a property to a prototype will not work, even though adding a method will.
Meanwhile, with JavaScript you need not bother for properties.
var f = new File();
f.myProp = 12;
that will work. Whether or not a property exists at instantiation is inconsequential. If it's not set, it will return undefined either way.
That said, with my limited experience with ID, adding arbitrary properties does not seem to work in the ID environment. It does in Bridge, PS, and others. I do not know what the differences are in implementation. But were I you, I would ask the folks on the ID forum.
Bob
Adobe Workflow Scripting