Prevent misused instance constructors from polluting global namespace

If a function should only be called as a constructor, it should call `utils.requireConstructor.call(this)` to throw an error if it is not called as a constructor.