Merge pull request #24 from JulianSchmid/master

fixed illegal memory access
Added LIBS to library target.