Only include ActiveRecord matchers if AR is defined

This is a fix for #480, whereby the ActiveRecord matchers were being included even though ActiveRecord isn't loaded. There's no obvious way to test this; the best I can do is to say the pull request fixes the problem in my own project, and all of the existing tests pass.

If there is some way I can add a test for this, let me know and I'll do so!