plugins: implemented custom plugin lookup.

related to #737.