fix build issue

git-svn-id: http://libtorrent.googlecode.com/svn@9760 f43f7eb3-cfe1-5f9d-1b5f-e45aa6702bda
merged fix from trunk and fixed stats logging issue

git-svn-id: http://libtorrent.googlecode.com/svn@9761 f43f7eb3-cfe1-5f9d-1b5f-e45aa6702bda