Patch based in https://github.com/phonegap/phonegap-plugins/issues/1047#issuecomment-18959874