Various minor fixes when building on ubuntu 14.04.1 LTS Trusty Tahr