fix compile error for ubuntu 12.04