Even your proposed layout doesn't work for me. Too much dead space between toilet and vanity. Just put the vanity where you propose to put the toilet, move the door a couple feet, and make a closet where the sink currently is.
Of course, as stated, this all depends on the joist direction. I have a feeling the toilet is not going anywhere (except rotate 90 degrees).
Just out of curiosity: How far away from the side wall is the center of the toilet as it sits right now? I'm guessing the back of the toilet was supposed to go against that wall. Maybe someone glued the flange down in the wrong orientation and was too lazy or incompetent to fix it?