Added missing stdio includes
Added missing libs to Makefile