Add fallbacks when the Sugar API is not available

This makes the html activities runnable again as standalone apps,
outside Sugar.
Merge pull request #2 from manuq/fallbacks

Add fallbacks when the Sugar API is not available