Some modifications for Linux and Android build.