make code compile on ubuntu14