gzip: change file open modes
gzip support: android
fix rhosimulator build