[xbuild] Implements property functions using constructor syntax. Fixes #12999