Add plugin support from newer branch into 1.9.0 branch

This should resolve issue #13.