fix compile errors under g++ for windows