C compiler portability fixes for 64-bit