Switched to using defined (in C99) casts.