Fix GCC 4.9 build errors