lua: replace bit operation lib