Made git versioning work better

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