Added a fix for android platform.
Now compiles for android.