Fix Android compilation errors.
Merge pull request #877 from hardye/android-fixes

Fix Android compilation errors