Fix compiler errors for GCC 4.6