Fix makefile
Fix compiler warnings
Fix compiling on XP - missing libtool