Quick fix for Kernel#define_singleton_method for classes