Made git versioning better

Now works when building with ant or eclipse (without ant).