Resolve path to cordova dynamically

Get path to cordova module via node.js require.resolve() to prevent plugin from failing when cordova is installed globally or at other place.