Don't assume wp_ is the prefix

Fixes #2306
Merge pull request #2385 from jamesgol/tableprefix

Don't assume wp_ is the prefix