Android and Linux fixes

Compiles on Linux and Android