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
Could you make this less Java-ish? This would be more readable:

    "new Object() { String toString() { '1.0' } }"