Fixes for g++ 4.7