Android mason: Get build working on Ubuntu

This fixes up various problems so android-mason builds on Ubuntu 14.04.

Needs to be used with https://github.com/mapbox/mason/pull/20 and https://github.com/mapbox/mason/pull/19