Fix type conversion error for GCC 4.7