I found what was the problem, the package repository did not have the latest libc-dev-bin
for some reason, so the following fixes the problem:
curl -O http://ftp.debian.org/debian/pool/main/e/eglibc/libc-dev-bin_2.13-38+deb7u10_mips.deb dpkg -i libc-dev-bin_2.13-38+deb7u10_mips.deb apt-get install gcc make automake autoconf linux-libc-dev curl -O http://ftp.debian.org/debian/pool/main/e/eglibc/libc6-dev_2.13-38+deb7u10_mips.deb dpkg -i libc6-dev_2.13-38+deb7u10_mips.deb
(it needs to be in that order) When I changed the repositories in the sources.list, the problem is still there, so I guess the cause will be fixed at some point.