Fix build problems on unix