fix macos build
Merge pull request #17 from manuzhang/fix_macos_build

fix macos build
remove redundant functions from BytesUtil and fix bugs
Merge pull request #19 from manuzhang/fix_testbytesutil_fails

remove redundant functions from BytesUtil and fix bugs