Build working on Ubuntu 12.04 (precise) with all warning messages fixed. Closes issue #1.