Compile fixes for gcc