Applied Oncaphillis' patch for gcc 4.7