Fix some compilation warnings in release mode and with GCC 4.6