allow to use classes with custom annotations for macros

Fixes #164