Fix pointer cast warnings in 64bit.