Fix some warnings when compiling with gcc 4.8.x/4.9.x