Fix warnings from gcc 4.6.3