fix compile error on ubuntu 12.04