Fix meson build without git repo (#3597)