Fix compile errors under linux