Fixed linking issues.

Modified the Makefile to fix linker issues on some systems.
Added include to make the compiler happy.