Fix check for existance of "execute" and "exec_query"

Without this, there is a crash when using the latest marginalia with 3.0 adapters, because they don't have exec_query methods.