ruby 1.8 alternative to define_singleton_method

fixes #30 

rush job (I didn't check for other ruby 1.8 compatibility issues yet) - but this might do it.