Fix compile warnings thrown by GCC 4.8 and Clang 3.3