Fix platform check android device problem

Use typeof Titanium.API to check Titanium environment to prevent crash on some Android devices.

Tested device:
* Samsung Galaxy Note II
* Samsung Galaxy 7

Error log before fix:
[ERROR] JNIUtil: Couldn't find Java class: ti/modules/titanium/platform/PlatformModule

Signed-off-by: Justin Lee <lis186@gmail.com>
Merge pull request #40 from lis186/fix_titanium_platform_check_android_problem

Fix platform check android device problem