compiler: allow classes with private constructors to be used for function-style casts

Was able to revert the changes in #158 because this fix also makes that change unnecessary.
4 files changed