Fix several casting issues exposed on 64-bit builds.
Fix several casting issues exposed on 64-bit builds.

Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch,Blue-Rocket/BRFullTextSearch