Error in phonegap plugin for changing the screen orientation
===

I am getting this error .

Uncaught TypeError: Object #<an Object> has no method 'exec' at file:///android_asset/www/JS/pg-plugin-screen-orientation.js:4


var screenOrientation = function() {}

screenOrientation.prototype.set  = function(str, success, fail) {
   PhoneGap.exec(success, fail, "ScreenOrientation", "set", [str]); // GETTING ERROR IN THIS LINE
 
};

navigator.screenOrientation = new screenOrientation();

I have followed the  steps given in this document.
https://github.com/champierre/pg-plugin-screen-orientation 

Please help me to solve this problem. 