timob-9448: porting fix from https://github.com/appcelerator/titanium_mobile/pull/2389
Merge pull request #83 from vishalduggal/timob-9448-30X

timob-9448: Backport to 3_0_X