Fixed linux build

Added missing includes and improved makefile