Ubuntu build

* Fixed build errors on Ubuntu, for both 32 and 64 bit versions.
* Added build instruction.