bzr-version-gen: Fix some portability issues.