Changes for compiling with gcc 4.8