Add plugin support from newer branch into 1.9.0 branch