Fix segfault in mysql/pg plugins. closes #76.