fixing unix compile errors