Address problems raised in issue #27

This pull request updates the minimum supported Cordova to 2.4.0 and fixes mutability bugs.