Address Linux incompatibilities

Tested on Ubuntu 12.04.
Merge pull request #1 from andrewgaul/linux

Address Linux incompatibilities