Helper function for defining properties.

Currently this is redundant with Node.defineProperties.
For Collection I wanted to use the same... maybe we should
turn it into a Node.