[build] fix some build errors on linux