Fix automatic versioning when compiling with Maven