fix code with NDK r9 and remove optimize settings for better compatible