fixes to compile on ubnutu with gcc 4.7.3