I haven't done it, but you will probably have to use a video editing software. Here is something that I found. Depending on the computer OS you are using there may already be video editing software available to do this. Windows Movie Maker is one that comes to mind.
In the camera "Setup" menu, do you have Auto Image Rotation/Rotation Tall (something like that) set to "ON"? If it is set to off, that is your problem.