some more compilation fixes, make file

note: make file compiles with gnu99 flag