Steady-state thermal transport in anharmonic systems: Application to molecular junctions