Adding a "construct" function to wrap constructors in plain functions.