Trying to make build work on Ubuntu 12.04 and OSX.