Add changes for compiling with Android from pstglia