Barrier engineering of a photonic molecule in a photonic crystal waveguide