adding _GNU_SOURCE definition in matrix.c