Adding code to support availability detection on Android 2.x

This commit makes Android 2.x behave correctly when retrieving the availability of a torch on the device. 
Newer Android versions work as well.