[TIMOB-14178] Added support for switch

https://jira.appcelerator.org/browse/TIMOB-14178

Added support for switch for ICS and older versions
you can merge these ifs