Revised according to recent API change.

Note: I haven't checked the iOS folder yet but I believe it should have similar changes on API.   But this patch works for Cordova / Phonegap 2.0 + on Android now.
Merge pull request #1 from yyang/master

Patch due to Cordova 2.0 API change