Use toString() representation of project.version

Gradle allows project.version to be of type Object and always calls
toString() on the version to get a String representation. Instead of
assuming that project.version is always a String, we need to do the same.

Fixes issue #38
The `public` modifier is not needed.