RESTEASY-1049 Check availability of CDI classes

This should fix the problem indicated in [the comment on RESTEASY-1049](https://issues.jboss.org/browse/RESTEASY-1049?focusedCommentId=12965334&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12965334) by assuring that the class used in the instanceof check is available.