Besides my last suggestion of using pywallet there is another way of retrieving private keys using some old tools from 2011. There is a tutorial at this link, but it's only for wallets from 2011, not for later versions. That's why the first thing you read in the thread is a warning that it's out of date.
[GUIDE] Simple wallet recovery using bitcointoolsIt uses some python software called bitcointools to get the job done.
If worse comes to worse, it's possible to just use the BDB tools to dump the database as a text file and pull the private keys from that.