You could be more specific on what version of iMovie do you use, what project settings do you use, what steps you have taken this far, and where the music comes from (iTunes library? maybe even music bought via iTunes...).
You could also export the movie via iMovie's export function instead of a direct upload, and see if that helps in any way preserving the music.
If that works you can then use MPEG Streamclip for converting it to something you can upload to your site of choice.
Btw, changing the file type/suffix won't help a thing, as file suffixes like .mp4 or .avi are just containers for videos encoded with MPEG-4 codecs like .h263/4 or Divx/Xvid and so on.