fix source code not to break RIFF header on both 32bit and 64bit machine.