sparse_vec: fix compilation with GCC

I didn't test my last commit with GCC, this fixes an issue that results in compilation failure.