Fixed some compilation errors for linux