Updated workaround for API level 8 and Android plugin (to work with the
newer SDKs).