conditional definitions for deprecated classes
Merge pull request #548 from aaemnnosttv/fix

conditional definitions for deprecated classes