actually check to see if the class defines the execute/exec_query methods

defined?(<symbol>) doesn't seem to do anything.

I prefer this to 37sigals/marginalia#14 if anyone cares about ruby 1.8.7.