fixed makefile typo and added iconv lib for osx
fixed uninitialized variable bug in tests