GIT_BEGIN/END_DECL were missing from sys/refs.h and preventing compilation with g++ as the symbol were mangled.