ProfilerStatementWrapper compatible with StatementInterface

Fix for #712