fix 64bit compile errors
Merge pull request #54 from pavlinux/master

fix 64bit compile errors (extented)