Fixes compilation with newer glibc. Ported gnulib patch from m4. Signed-off-by: Rosen Penev <rosenp@gmail.com>