I agree with the above. I think the thing to do would be simply to trickle charge the battery from the solar cells (looks like you have all the kit in place the do that already) and then simply drop to 5v to the USB output - no switching at all required, the batteries are simply on-line all the time.
When the available power from the sun exceeds the drain on the USB, the batteries will charge - in the opposite case, they'll discharge. If you've a proper charge controller it will prevent over charge/discharge etc.
If you can stand the additional complexity, a switching step-down regulator would be more efficient and make better use of your free energy, given the large drop from 12v at 5v.
Hope this helps.