Fixed some problems for building on linux