Fixes for strict compilation with gcc 4.7