Compilation fixes for gcc 4.9.1