port to phonegap 2.4+

change deprecated plugin api to new one