Make linkable on Ubuntu 12.04LTS.
Work around core dump for tests.
Merge pull request #1 from sailorfred/master

I'm using Ubuntu 12.04LTS and ran into some build and test problems