Add some casts so that we're not bitten by type promotions on 64-bit systems. Not a great concern since the only 64-bit system currently supported by NetBSD (Alpha) uses assembly versions of these routines.
Checking them in to make people happy.