Changes to compile under gcc 4.8