fix various compiling complains with gcc version 4.8.1 in Ubuntu Saucy