Ubuntu compilation support.

I added README and COMPILE instructions and made slight code changes to support compilation in stock Ubuntu. Has been tested with Ubuntu 14.04 LTS on a x86_64 machine, but also applies to other architectures.