Use -custom in class name for non-builtin types, fixes #659