Simplified createEmptyCtor using Function instead of eval