Ported plugin to Phonegap >= 2.0.0