fix building with HEAD