The mere fact that the trolley would roll over people and not try to stop means that there's no driver on the trolley. Now, if the trolley is uncontrollable, he can always attempt to jump to save himself before blowing the trolley up.
Even if there was a trolley driver, if they weren't trying to stop then their a deranged psychopath that needs to be stopped. Now, if they were trying to stop it then the driver can jump before getting blown up so long as the driver is given a signal.