If replacing the entire cable with one long enough to reach isn't feasible you could install a junction box above the switch and add a short cable there. I'd put the junction box either level with the top of the door frame or just under the crown molding.